home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / inputb20.zip / INPUTBOX.FRM < prev    next >
Text File  |  1996-11-04  |  3KB  |  143 lines

  1. VERSION 4.00
  2. Begin VB.Form InputForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "InputForm"
  5.    ClientHeight    =   1305
  6.    ClientLeft      =   4410
  7.    ClientTop       =   1425
  8.    ClientWidth     =   4845
  9.    ControlBox      =   0   'False
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   1710
  21.    Left            =   4350
  22.    LinkTopic       =   "Form2"
  23.    MaxButton       =   0   'False
  24.    MinButton       =   0   'False
  25.    ScaleHeight     =   1305
  26.    ScaleWidth      =   4845
  27.    Top             =   1080
  28.    Width           =   4965
  29.    Begin VB.TextBox Answer 
  30.       Height          =   315
  31.       Left            =   1800
  32.       TabIndex        =   3
  33.       Top             =   240
  34.       Width           =   2940
  35.    End
  36.    Begin VB.CommandButton Cancel 
  37.       Cancel          =   -1  'True
  38.       Caption         =   "Cancel"
  39.       Height          =   330
  40.       Left            =   2760
  41.       TabIndex        =   1
  42.       Top             =   840
  43.       Width           =   1275
  44.    End
  45.    Begin VB.CommandButton OK 
  46.       Caption         =   "OK"
  47.       Default         =   -1  'True
  48.       Height          =   330
  49.       Left            =   960
  50.       TabIndex        =   0
  51.       Top             =   840
  52.       Width           =   1275
  53.    End
  54.    Begin VB.Label Question 
  55.       AutoSize        =   -1  'True
  56.       BackStyle       =   0  'Transparent
  57.       Caption         =   "Question:"
  58.       Height          =   195
  59.       Left            =   105
  60.       TabIndex        =   2
  61.       Top             =   315
  62.       Width           =   825
  63.    End
  64. End
  65. Attribute VB_Name = "InputForm"
  66. Attribute VB_Creatable = False
  67. Attribute VB_Exposed = False
  68. ' InputBox.Frm
  69. ' Form used by InputBox.Bas
  70. ' (see that for more information)
  71. ' ⌐1994-1996 Tuomas Salste (vbshop@netgate.net)
  72.  
  73. Option Explicit
  74.  
  75. Public CharCase As Long
  76. Private Sub Answer_Change()
  77.  
  78. If CharCase Then
  79.     ChangeCase Answer
  80. End If
  81.  
  82. End Sub
  83.  
  84. Private Sub Answer_GotFocus()
  85.  
  86. Answer.SelStart = 0
  87. Answer.SelLength = Len(Answer)
  88.  
  89. End Sub
  90.  
  91. Private Sub Cancel_Click()
  92.  
  93. Answer = ""
  94. Tag = ""
  95. Hide
  96.  
  97. End Sub
  98.  
  99. Private Sub ChangeCase(t As TextBox)
  100.  
  101. Dim ss As Integer
  102. ss = t.SelStart
  103.  
  104. Select Case CharCase
  105.     Case IBUcase
  106.         t = UCase(t)
  107.     Case IBLcase
  108.         t = LCase(t)
  109.     Case Else
  110. End Select
  111.  
  112. t.SelStart = ss
  113.  
  114. End Sub
  115.  
  116. Private Sub Form_Activate()
  117.  
  118. Dim RightBorder As Long
  119. Const MARG = 50
  120.  
  121. Question.Refresh
  122. Answer.Left = Question.Left + Question.Width + MARG
  123. Answer.Width = ScaleWidth - Answer.Left - MARG
  124.  
  125. Answer.SetFocus
  126. MousePointer = vbDefault
  127.  
  128. End Sub
  129.  
  130. Private Sub Form_Unload(Cancel As Integer)
  131.  
  132. Tag = ""
  133.  
  134. End Sub
  135.  
  136. Private Sub OK_Click()
  137.  
  138. Tag = "OK"
  139. Hide
  140.  
  141. End Sub
  142.  
  143.